package com.qiguliuxing.dts.wx.job;

import com.qiguliuxing.dts.wx.service.HomeCacheManager;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

/**
 * 首页缓存更新定时任务
 */
@Component
public class HomeCacheJob {
    private final Log logger = LogFactory.getLog(HomeCacheJob.class);

    @Scheduled(cron = "0 01 0 ? * *")
    public void clearCache(){
        logger.info("****开始清除首页缓存****");
        HomeCacheManager.clearAll();
        logger.info("****清除首页缓存结束****");
    }
}
